package org.theSeed.fileContract.pojo.vo;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Map;

/**
 * 文件返回对象
 */
@Getter
@Setter
public class SeedUploadFileVo implements Serializable {
    public SeedUploadFileVo() {
    }

    public SeedUploadFileVo(String resourceId,String fileUrl) {
        this.resourceId = resourceId;
        this.fileUrl = fileUrl;
        this.sonResourceId = sonResourceId;
    }

    public static SeedUploadFileVo createSonUploadVo(String resourceId,String sonResourceId) {
        SeedUploadFileVo seedUploadFileVo = new SeedUploadFileVo();
        seedUploadFileVo.setResourceId(resourceId);
        seedUploadFileVo.setSonResourceId(sonResourceId);
        return seedUploadFileVo;
    }

    /**
     * 访问地址
     */
    private String fileUrl;

    /**
     * 访问id,资源全局唯一表示
     */
    private String resourceId;

    /**
     * 子文件上传访问id
     */
    private String sonResourceId;

    /**
     * 扩展信息
     */
    private Map<String,Object> extInfo;
}
